package com.util;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
import com.real.StudyWordActivity;

/**
 * Created with IntelliJ IDEA.
 * User: real
 * Date: 12-7-21
 * Time: 下午8:55
 * To change this template use File | Settings | File Templates.
 */
public class Function {

    public static void SwitchActivity(Activity currentActivity, Class<?> switchTo)
    {
        try{
            Intent intent = new Intent().setClass(currentActivity, switchTo);
            currentActivity.startActivityForResult(intent, 0);
        }
        catch (Exception e)
        {
            Toast.makeText(currentActivity, e.getMessage(), Toast.LENGTH_LONG).show();
        }
    }

}
